<template>
  <div>
    <div class="recommend-title">热销推荐</div>
    <ul>
        <li class="item border-bottom" v-for = "item of list" :key="item.id">
                <img  class="item-img" :src ="item.imgUrl">
            <div class="item-info">
                <p class="item-title">{{item.title}}</p>
                <p class="item-desc">{{item.desc}}}</p>
                <button class="item-button">查看详情</button>
            </div>
        </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HomeRocommend',
  props: {
    list: Array
  }
  // data () {
  //   return {
  //     RecommendList: [{
  //       id: '001',
  //       imgUrl: 'http://img1.qunarzz.com/sight/p0/1409/19/adca619faaab0898245dc4ec482b5722.jpg_224x148_9be48563.jpg',
  //       desc: '北京天安门有踏踏大魔王，塌塌大魔王带你看熊猫',
  //       title: '北京天安门'
  //     }, {
  //       id: '002',
  //       imgUrl: 'http://img1.qunarzz.com/sight/p0/1708/2b/2b3b94de99c0a425a3.img.jpg_280x200_05658b1e.jpg',
  //       desc: '八达岭长城有塌塌大魔王和你看长城',
  //       title: '八达岭长城'
  //     }, {
  //       id: '003',
  //       imgUrl: 'http://img1.qunarzz.com/sight/p0/1505/f5/f5f45e1a83537bcb.water.jpg_280x200_b5ebb032.jpg',
  //       desc: '圆明园有塌塌大魔王带你看历史',
  //       title: '圆明园'
  //     }]
  //   }
  // }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/mixins.styl'
  .recommend-title
    margin-top: .2rem
    line-height: .8rem
    background: #eee
    text-index: .2rem
  .item
    display: flex
    height: 1.9rem
    overflow: hidden
    .item-img
      width: 1.7rem
      height: 1.7rem
      padding: .1rem
    .item-info
      flex: 1
      min-width: 0
      padding: .1rem
      .item-title
        line-height: .54rem
        font-size: .32rem
        ellipsis()
      .item-desc
        line-height: .4rem
        color: #ccc
        ellipsis()
      .item-button
        background-color #ff9300
        line-height: .44rem
        padding: 0 .2rem
        border-radius: .06rem
        color: #fff
</style>
